<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
	<title>Vorpal: Scripting Language Reference</title>
	<link rel="stylesheet" type="text/css" href="styles.css" media="screen" />
</head>
<body>

<!--TOP-NAV-->
	<h1>Vorpal: Scriping Language Reference (Preliminary)</h1>
	<div id="top-nav"><ul id="top-nav-list">
		<li></li>
		<li> - <a href="fundamentals.html">Fundamentals</a></li>
		<li> - <a href="keywords.html">Keywords</a></li>
		<li> - <a href="types.html">Types</a></li>
		<li> - <a href="operators.html">Operators</a></li>
		<li> - <a href="methods.html">Methods</a></li>
		<li> - <a href="objects.html">Objects</a></li>
		<li> - </li>
	</ul></div>
<!--END-TOP-NAV-->

	<h2>Operators</h2>
	<p>
		Vorpal has left to right operator precedence. There is no other operator
		precedence. To ensure correct evaluation order, surround an expression
		with parentheses, e.g. <code>(<i>expression</i>)</code>.
	</p>
	
	<h3><a name="boolean">Boolean Operators</a></h3>
	
	<h4>Equality '<code>==</code>'</h4>
	<p>
		Returns a Boolean, whether two Booleans are equal.
	</p>
	
	<h4>Inequality '<code>!=</code>'</h4>
	<p>
		Returns a Boolean, whether two Booleans are not equal.
	</p>
	
	<h4>OR '<code>||</code>'</h4>
	<p>
		Returns a Boolean, the OR of two Booleans.
	</p>
	
	<h4>AND '<code>&&</code>'</h4>
	<p>
		Returns a Boolean, the AND of two Booleans.
	</p>

	<h3><a name="number">Number Operators</a></h3>
	
	<h4>Equality '<code>==</code>'</h4>
	<p>
		Returns a Boolean, whether two numbers are equal.
	</p>
	
	<h4>Inequality '<code>!=</code>'</h4>
	<p>
		Returns a Boolean, whether two numbers are not equal.
	</p>
	
	<h4>Less Than '<code><</code>'</h4>
	<p>
		Returns a Boolean, whether a number is less than another.
	</p>
	
	<h4>Greater Than '<code>></code>'</h4>
	<p>
		Returns a Boolean, whether a number is greater than another.
	</p>
	
	<h4>Less Than Or Equal '<code><=</code>'</h4>
	<p>
		Returns a Boolean, whether a number is less than or equal to another.
	</p>
	
	<h4>Greater Than Or Equal '<code>>=</code>'</h4>
	<p>
		Returns a Boolean, whether a number is greater than or equal to another.
	</p>
	
	<h4>Addition '<code>+</code>'</h4>
	<p>
		Adds two numbers, and returns the result as a number.
	</p>
	
	<h4>Subtraction '<code>-</code>'</h4>
	<p>
		Subtracts two numbers, and returns the result as a number.
	</p>
	
	<h4>Multiplication '<code>*</code>'</h4>
	<p>
		Multiplies two numbers, and returns the result as a number.
	</p>
	
	<h4>Division '<code>/</code>'</h4>
	<p>
		Divides two numbers, and returns the result as a number.
	</p>
	
	<h4>Remainder (Modulus) '<code>%</code>'</h4>
	<p>
		Divides two numbers, and returns the remainder as a number.
	</p>
	
	<h4>Power (Exponent) '<code>^</code>'</h4>
	<p>
		Raises a number to the power of another.
	</p>
	
	<h3><a name="string">String Operators</a></h3>
	
	<h4>Equality '<code>==</code>'</h4>
	<p>
		Returns a Boolean, whether two strings are equal (binary compare).
	</p>
	
	<h4>Inequality '<code>!=</code>'</h4>
	<p>
		Returns a Boolean, whether two strings are not equal (binary compare).
	</p>
	
	<h4>Concatenation '<code>+</code>'</h4>
	<p>
		Concatenates the string form of an object (right hand side) to the end of
		the string (left hand side). The string form is that returned by the
		object's <code>print()</code> method.
	</p>
	
	<h3><a name="object">Object Operators</a></h3>
	
	<h4>Member Access '<code>.</code>'</h4>
	<p>
		Used to access member data and methods in an object.
	</p>
	<p>
		Examples:
	</p>
	<ul>
		<li><code>'Hello'.print()</code> prints '<code>Hello</code>'</li>
	</ul>
	
	<h4>Dynamic Slot Access '<code>.{<i>expression</i>}</code>'</h4>
	<p>
		Used to access member data and methods in an object dynamically.<br>
		The hash of <i>expression</i> is used to create and access the slot.<br>
		By using a variable (e.g. a number) <i>expression</i>, arrays can be
		formed.
	</p>
	<p>
		Examples:
	</p>
	<ul>
		<li>
			<code>
				a = 0<br>
				a.{1} = 'a1'<br>
				b = 1<br>
				a.{b}.print()<br>
			</code><br>
			prints '<code>a1</code>'
		</li>
	</ul>
</body>
</html>